/**
 * Alibaba.com.cn Inc.
 * Copyright (c) 2004-2021 All Rights Reserved.
 */
package com.starlink.utils;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;

import java.util.Date;

/**
 * @author zhanghong
 * @version OrderNumUtil.java, v 0.1 2022/4/9 00:21 下午 OrderNumUtil Exp $$
 */
public class OrderNumUtil {

    /**
     * 生成订单编号
     * @return
     */
    public static String createUniqueOrderNum() {
        return DateUtil.format(new Date(), "yyyyMMddHHmmss") + RandomUtil.randomNumbers(6);
    }
    /**
     * 生成物流编号
     * @return
     */
    public static String createJdUniqueOrderNum() {
        return DateUtil.format(new Date(), "yyyyMMddHHmm") + RandomUtil.randomNumbers(4);
    }
    /**
     * 生成打印编号
     * @return
     */
    public static String createPrintNum() {
        return DateUtil.format(new Date(), "yyyyMMddHHmmss") + RandomUtil.randomNumbers(8);
    }
}
